<template>
	<view class="rmyy">
		<view class="biaoti">
			<view class="biaoti_rm">
				{{title}}
			</view>
			<view class="biaoti_gd">
				更多
				<uni-icons color="darkgrey" size="12" type="forward"></uni-icons>
			</view>
		</view>
		<view class="gqxq" v-if="List.length >= 6">
			<view v-for="(item, index) in List" class="xhz" :key="index">
				<view class="xhz_tp">
					<image :src="item.al.picUrl" mode="scaleToFill"></image>
				</view>
				<view class="xhz_wb">
					<view class="gqm">
						{{item.name}}
					</view>
					<view class="gs">
						{{item.ar[0].name}}
					</view>
				</view>
			</view>
		</view>
		
		<view class="gqxq" v-else>
			<view v-for="(item, index) in List" class="xhz" :key="index">
				<view class="xhz_tp">
					<image :src="item.coverImgUrl" mode="scaleToFill"></image>
				</view>
				<view class="xhz_wb">
					<view class="gqm1">
						{{item.name}}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"my-gqk",
		props: {
			// 标题
			title: {
				type: String,
				defaul: '标题'
			},
			List: {
				type: Array,
				default: []
			}
		},
		data() {
			return {
				
			};
		},
    methods:{
      goToPlay(){
        uni.navigateTo({
          url:'/subpkg/music-play/music-play'
        })
      }
    }
	}
</script>

<style lang="scss">
.biaoti {
	height: 120rpx;
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 0 4%;
	
	.biaoti_rm {
		font-weight: bold;
		font-size: 20px;
	}
	
	.biaoti_gd {
		font-size: 13px;
		color: darkgrey;
	}
}

.gqxq {
	width: 100%;
	display: flex;
	justify-content: space-evenly;
	align-items: center;
	flex-wrap: wrap;
	
	.xhz {
		width: 29%;
		height: 300rpx;
		margin-bottom: 5px;
		
		.xhz_tp {
			width: 100%;
			height: 220rpx;
			
			image {
				width: 100%;
				height: 100%;
			}
		}
		
		.xhz_wb {
			margin-top: 5px;
			
			.gqm{
				font-size: 13px;
				white-space: normal;
				width: 100%;
				overflow: hidden;
				text-overflow: ellipsis;
			}
			.gqm1 {
				font-size: 13px;
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 2;
			}
			.gs {
				font-size: 10px;
				color: darkgrey;
			}
		}
	}
}
</style>